import request from "@/utils/request"

const submitOrderMessage = (data) => {
    return request({
        url: "/api/order/submit",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        method: "post",
        data
    })
}
const findOrderById = (id) => {
    return request({
        url: `/api/order/find/${id}`,
        method: "get"
    })
}
const findOrderByUserId = (id) => {
    return request({
        url: `/api/order/findByUserId/${id}`,
        method: "get"
    })
}
const deleteOrder = (id) => {
    return request({
        url: `/api/order/delete/${id}`,
        method: "delete"
    })
}

const submitOrderShoesMessage = (data) => {
    return request({
        url: "/api/orderShoes/submit",
        headers: { "Content-Type": "application/json;charset=utf-8" },
        method: "post",
        data
    })
}

export { findOrderById,findOrderByUserId,submitOrderMessage,deleteOrder,submitOrderShoesMessage }
